home *** CD-ROM | disk | FTP | other *** search
/ System Booster / System Booster.iso / Texteditors / Origami / Sources / doc / MOUSY < prev    next >
Encoding:
Text File  |  1996-09-27  |  2.2 KB  |  47 lines

  1. This version of Origami can handle the mouse of your system, if you  are  using
  2. MGR or X-windows and xterm's. If you want to add an  additional  mouse support,
  3. the following will give you some hints for doing it properly:
  4.  
  5. * In h/os.h there are the defines, which control the handling and  defining  of
  6.   mouse-dependent things. Origami  can  handle  more  than  one  mouse-support.
  7.   Therefor we declared a enum,  containing all possible mouse-types and `NONE'.
  8.   Use
  9. #    define OS_MOUSE_TAG mytyp
  10.   to add another mouse-support-tag in this enum.
  11.  
  12. * Origami chooses the mouse-support depending on the value of  the  environment
  13.   variable TERM. The same string is used in -M for keybind. Define it with:
  14. #    define OS_MOUSE_NAME "mytyp"
  15.  
  16. * The buttonnames in the bindinglist are created by Origami. Therefor it  needs
  17.   the following translations:
  18. #    define OS_MOUSE_COUNT  2         /* number of mouse-buttons        */
  19. #    define OS_MOUSE_NAMES  {"l","r"} /* names displayed for button 0,1 */
  20.  
  21. * There must be added  some  code  in  origami/keyboard.c,  which  activates  /
  22.   deactives the mouse and handles the clicks. This are only hints,  check  your
  23.   own environment to get information about handling your mouse.
  24.  
  25.    * activating the mouse:
  26.      in init_keyboard() you have to add code, to initialise the mouse.
  27.    * deactivate the mouse
  28.      in reset_keyboard() you have to add code, for switching the mouse off.
  29.    In both cases use MGR/XTERM-code as example. The scanning of the mouse can
  30.    be done in two ways:
  31.    * activ:
  32.      You have to scan the mouse with a procedure/system-call. Do it like the
  33. #     if 0 example in the get_key-loop.
  34.      In this case, you have to define:
  35. #       define OS_MOUSE_CODE ""
  36. #       define OS_MOUSE_LG 0
  37.    * passiv:
  38.      The mouse sends a sequence of characters as header, followed by  a  coding
  39.      of the position.. . Handle it like  the  MGR/XTERM-code.  The  mouse-click
  40.      will be recognized by the normal keyboard-translations. In this  case  you
  41.      have to define:
  42. #       define OS_MOUSE_CODE "your seqyuence"
  43. #       define OS_MOUSE_LG   strlen(OS_MOUSE_CODE)
  44.  
  45. New mouse-ports can only be included to the standrad-distribution, if  we  know
  46. them :-)
  47.